﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Threading;

namespace AleCrono
{
    /// <summary>
    /// Interaction logic for WindowMinicrono.xaml
    /// </summary>
    public partial class WindowMinicrono : Window
    {
        DispatcherTimer timer = new DispatcherTimer();


        public WindowMinicrono()
        {
            InitializeComponent();
        }

        private void WinMinicrono_Loaded(object sender, RoutedEventArgs e)
        {
            timer.Interval = TimeSpan.FromMilliseconds(10);
            timer.Tick += new EventHandler(timertick);
            timer.Start();
        }

        private void timertick(Object sender, EventArgs args)
        {
            this.lblCronometro.Content = AleCronoWPF.WinCronometro.labcrono;
        }

        private void WinMinicrono_MouseDown(object sender, MouseButtonEventArgs e)
        {
            try
            {
                this.DragMove();
            }
            catch
            {
            }
        }

        private void WinMinicrono_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            this.Visibility = Visibility.Hidden;
        }
    }
}
